﻿@model IEnumerable<WStest.Models.ChatView>

@section featured {
<section class="featured">
    <div class="content-wrapper">
        <hgroup class="title">
            <h1>Postits</h1>
            <h2>View your postits here</h2>
        </hgroup>
    </div>
</section>
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (@Html.BeginForm("AddChatMessage", "Chat", "GET"))
{
    <div>
        <table>
        <tr>
            <th>Time</th>
            <th>User</th>
            <th>Content</th>
        </tr>
            @{
                foreach (WStest.Models.ChatView cv in Model)
                {
                    <tr>
                        <td>@cv.date</td>
                        <td>@cv.username</td>
                        <td>@cv.content</td>
                    </tr>
                }
            }
        </table>
         <div>
            @Html.Label("Add")
            @Html.Editor("Content")
            <input type="submit" value="Add" />
        </div>
    </div>
    
}
